﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CurrInHosp_ByDiag.aspx.cs" Inherits="Page_AutoUpdate_CurrInHosp_ByDiag" %>

<!doctype html>

<html class="病区列表">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <title>病区列表</title>
    <script src="../../Scripts/jquery-1.8.0.min.js"></script>
    <!--自定义-->
    <link href="../../CSS/m.1.0.css" rel="stylesheet" />
    <link href="../../CSS/m1.css" rel="stylesheet" />
    <link href="../../CSS/product-class.css" rel="stylesheet" />
    <style>
        .typename
        {
            height: 32px;
            line-height: 32px;
            display: block;
            overflow: hidden;
            font-size: 17px;
            border-bottom: 1px dashed grey;
        }

        section
        {
            /*margin-top: 20px;*/
        }
    </style>
</head>
<body class="red">
    <div class="gridContainer clearfix lml_class">
        <section class="lb_box">
            <div class="right">
                <div class="cases" style="display: block;">
                    <ul>
                    </ul>
                </div>
            </div>
        </section>
        <div class="noneDate" style="text-align: center; margin-top: 30%; display: none;">
            <p>还没有任何在院患者~</p>
        </div>
    </div>

    <script type="text/javascript">
        $().ready(function () {
            GetList();
        });


        function GetList() {
            $.post("/Handler/AutoUpdateHandler.ashx?action=GetCurrInHosp_ByDiag", { KEY: '<%=Key%>' }, function (data) {
                var list = eval("(" + data + ")").List;
                if (data == "" || typeof (eval("(" + data + ")").List) == "undefined") {
                    $(".noneDate").show();
                    $(".lb_box").hide();
                } else {
                    $(".lb_box").show();
                    var allTr = "";
                    for (var i = 0; i < list.length; i++) {
                        var link = "CurrInHosp_ByDiag_Item.aspx?DiagOrgID=" + list[i].DiagOrgID + "&KEY=<%=UnicodeKey%>";
                        var childTemp = '<li>'
                            + '<a href="{link}">'
                            + '<span class="typename">{DiagOrgName}</span>'
                            + '<span class="text">{Number}</span>'
                        + '</a></li>';
                        allTr += childTemp.replace(/{link}/, link)
                        .replace(/{DiagOrgName}/, list[i].DiagOrgName)
                        .replace(/{Number}/, list[i].Number);
                    }
                    $(".cases ul").append(allTr);
                }
            });
        }
    </script>
</body>
</html>
